﻿using System;
using System.Security.Cryptography;
using System.Text;

namespace OpenRefineEngine.GREL
{
    static class Hash
    {
        public static string Md5(string original)
        {
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] originalBytes = Encoding.Default.GetBytes(original);
            byte[] encodedBytes = md5.ComputeHash(originalBytes);
            return BitConverter.ToString(encodedBytes).Replace("-","");
        }
    }
}
